<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <button>点击</button>
        <input type="text" value="">
    </div>
    <script>
        var btn = document.querySelector('button');
        var ipt = document.querySelector('input');
        btn.onclick = function(){
            ipt.value = '哈哈哈';
            this.disabled = true;
        }
    </script>
</body>
</html>